package cn.itsource.service.impl;

import cn.itsource.domain.Provider;
import cn.itsource.mapper.ProviderMapper;
import cn.itsource.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProviderServiceImpl implements ProviderService {

    @Autowired
    private ProviderMapper providerMapper;

    @Override
    public List<Provider> findAll() {

        return providerMapper.findAll();
    }

    @Override
    public void add(Provider provider) {
         providerMapper.add(provider);
    }

    @Override
    public void update(Provider provider) {
        providerMapper.update(provider);
    }

    @Override
    public void delete(int id) {
        providerMapper.delete(id);
    }

    @Override
    public Provider findOne(int id) {
        return providerMapper.findOne(id);
    }
}
